<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/mobile-header.jsp"%>
<html class="ui-mobile">
<head>
<!-- 手机端 -->
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1, user-scalable=no">
<title>${project.name }</title>
<script type="text/javascript" src="${ctxStatic }/site/themes/XianHuaQingHuai/jquery.min.js"></script>
<script type="text/javascript" src="${ctxStatic }/site/themes/XianHuaQingHuai/jquery.mobile-1.3.0.min.js"></script>
<script type="text/javascript" src="${ctxStatic }/site/themes/XianHuaQingHuai/jquery.slide-packer.js"></script>
<link rel="stylesheet" type="text/css" href="${ctxStatic }/site/themes/XianHuaQingHuai/jquery.mobile-1.3.0.css">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/site/themes/XianHuaQingHuai/style.css">
<link href="${ctxStatic }/site/themes/XianHuaQingHuai/jiathis_share.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	function goUrl(url){
		location.href=url;
	}
</script>
</head>
</head>
<body class="ui-overlay-o ui-mobile-viewport ui-overlay-p" data-theme="lb">
	<iframe frameborder="0" style="position: absolute; display: none; opacity: 0; height: 300px;"></iframe>
	<div class="jiathis_style" style="position: absolute; z-index: 1000000000; display: none; top: 50%; left: 50%; overflow: auto;"></div>
	<div class="jiathis_style" style="position: absolute; z-index: 1000000000; display: none; overflow: auto;"></div>
	<!-- <iframe frameborder="0" src="utility.jsp" style="display: none; height: 300px;"></iframe> -->
	<!-- /page -->
	<div data-role="page" id="main-page" data-title="${project.name }"
		data-url="demo-page" tabindex="0" data-theme="p"
		style="min-height: 550px; padding-bottom: 57px;"
		class="ui-page ui-body-p ui-page-footer-fixed ui-page-active">
		<div>
			<div style="padding: 10px; height: 25px">
				<a href="#" title="" class="ui-link"> <img src="${ctxStatic}/site/themes/XianHuaQingHuai/images/logo.jpg" class="logo-pic" align="center" alt="">
				</a>
				<div style="position: absolute; top: 5px; right: 5px; z-index: 10">
					<div style="text-align: center; display: inline-block">
						<a href="#" title="" class="weibo ui-link"> 
							<img src="${ctxStatic}/site/themes/XianHuaQingHuai/images/weibo.png" alt=""><br>
							<span>新浪微博</span></a>
					</div>
					<div
						style="text-align: center; display: inline-block; margin-left: 3px">
						<a href="#" title="" class="weibo ui-link"> 
							<img src="${ctxStatic}/site/themes/XianHuaQingHuai/images/tenxun.png" alt=""><br>
							<span>腾讯微博</span></a>
					</div>

				</div>
				<span style="font-size: 15px; line-height: 25px"><strong>首页</strong></span>
			</div>
			<hr color="#AE223C">
			<div class="header_nav">
				<div class="ui-grid-c" style="text-align: center">
					<div class="ui-block-a">
						<a href="#" onclick="goUrl('${ctxMobileSite}/${project.id}')" title="" class="ui-link">网站首页</a>
					</div>
					<div class="ui-block-b">
						<a href="#"  onclick="goUrl('${ctxMobileSite}/${project.id}?menuId=6')" title="" class="ui-link">公司简介</a>
					</div>
					<div class="ui-block-c">
						<a href="#" onclick="goUrl('${ctxMobileSite}/${project.id}?menuId=7')" title="" class="ui-link">联系我们</a>
					</div>
					<div class="ui-block-d">
						<a href="#" title="" class="ui-link">公司地图</a>
					</div>
				</div>
			</div>
		</div>
		<!-- /header -->

		<!-- /content -->
		<div data-role="popup" id="popupMenu" data-theme="p" class="ui-popup ui-body-p ui-overlay-shadow ui-corner-all"
				aria-disabled="false" data-disabled="false" data-shadow="true"
				data-corners="true" data-transition="none" data-position-to="origin"
				data-dismissible="true"> 
				</div>
				<div>
				<ul data-role="listview" style="min-width: 210px;" data-theme="d"
					 style="list-style:none" >
					<li data-role="divider" data-theme="dr2" class="ui-li ui-li-static ui-btn-up-dr2 ui-first-child">公司简介</li>
					<li><strong>${project.companyName }</strong></li>
					<li><p>${project.remarks }</p></li>
				</ul>
			</div>
		</div>
		
		<!-- 
		<footer data-role="footer" data-position="fixed" data-theme="dr2"
			id="footer" class="ui-footer ui-bar-dr2 ui-footer-fixed slideup"
			role="contentinfo">
			<div class="ui-grid-b">
				<div class="ui-block-a" style="text-align: center">
					<a class="footer-link ui-link" href="#">
						<div>
							<img src="${ctxImages }/026.png" alt=""/> 
							<span style="margin: 3 0px">首页</span>
						</div>
					</a>
				</div>
				<div class="ui-block-b">
					<a class="footer-link ui-link" href="#" data-rel="popup" data-transition="slideup" data-position-to="window">
						<div>
							<img src="${ctxImages }/021.png" alt=""/> 
							<span style="margin: 3 0px">互动</span>
						</div>
					</a>
				</div>
				<div class="ui-block-c">
					<a class="footer-link ui-link" href="#">
						<div>
							<img src="${ctxImages }/022.png" alt=""/>
							<span style="margin: 3 0px">账户信息</span>
						</div>
					</a>
				</div>
			</div>

			<div style="display: none;">
			</div>
		</footer>
		 -->

	<script type="text/javascript">
		//关闭全局ajax
		$(document).bind("pageinit", function() {
			$.mobile.ajaxEnabled = false;
			$.mobile.ignoreContentEnabled = true
		});
	</script>

	<script type="text/javascript">
		try {
			window.onunload = stay;
			window.onload = function() {
				autoSize();
				slider_size();
			}

			pageOpen = new Date();//定义一个新的日期对象，记录开始浏览页面时间。  
			function stay() {//定义一个函数。  
				pageClose = new Date();//定义一个新的日期对象，记录结束浏览页面时间。  
				minutes = (pageClose.getMinutes() - pageOpen.getMinutes()); //“分钟”变量等于结束时间的分钟数减去开始时间的分钟数。  
				seconds = (pageClose.getSeconds() - pageOpen.getSeconds());//“秒数”变量等于结束时间的秒数数减去开始时间的秒数数。  
				time = (seconds + (minutes * 60));//时间变量等于“秒数”变量加上“分钟”变量乘以60，即变为以秒记
				send_time(time);
				return time;
			}
			function send_time(time) {
				var media_ad_id = '119349';
				var action = 'mshow';

				var url = '/MediaApp/send_duration';
				url = url + '?media_ad_id=' + media_ad_id + '&action=' + action
						+ '&duration=' + time;
				var i = new Image(1, 1);
				i.src = url;
			}

			function autoSize() {
				$("img,iframe,embed").each(
						function() {
							if ($(this).width() > $(this).parent().width()
									|| $(this).width() > $(window).width()) {
								$(this).css('max-width', "100%");
							}
						});
				$("iframe").each(function() {
					var _width = $(this).width();
					if (_width) {
						$(this).css('height', _width);
					}
				})
			}

			// 图片跳转放大
			$(".ui-content img").click(function() {
				if (!$(this).parent().attr('href')) {
					window.location.href = $(this).attr('src');
				}
			});

			//约束轮播图片的比例
			function slider_size() {
				var slider_height = 0;
				slider_height = $(".slider .switchable-box").width() * 0.75;
				$(".slider .switchable-box").height(slider_height);
				$(".slider .switchable-content img").height(slider_height);
			}

		} catch (e) {

		}
	</script>
</body>
</html>